package com.jackrain.nea.ad.web.service;


import com.alibaba.dubbo.config.annotation.Service;
import com.jackrain.nea.exception.NDSException;
import com.jackrain.nea.util.ValueHolder;
import com.jackrain.nea.web.face.User;
import com.jackrain.nea.web.service.SearchService;
import com.jackrain.nea.web.services.QueryAKCmd;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Collection;
import java.util.HashMap;

@Slf4j
@Component("QueryAKCmdImpl-ad")
@Service(protocol="dubbo", validation="true", version="1", group= "ad")
public class QueryAKCmdImpl implements QueryAKCmd {


    @Autowired
    private SearchService searchService;


    public ValueHolder execute(HashMap map) throws NDSException {
        return searchService.queryAKByID((User)map.get("user"),(int)map.get("colid"),(String)map.get("ids"));
    }

    @Override
    public ValueHolder QueryByIDs(User user, String tableName, Collection<Long> ids) throws NDSException {
        return searchService.queryAKByIDs(user, tableName, ids);
    }
}
